package com.yjq0714.test2;

import java.util.HashMap;
import java.util.Map;

public class OutputString {
    public static Map<Integer,String> out(String string){
        Map<Integer,String> map = new HashMap<Integer, String>();
        int x = 0;
        if (string.length()>=210){
            System.out.println("数据量已超出，只显示前6行!");
        }
        for (int i=0;i<string.length();i=i+35){
            if(i+35>string.length()){
                map.put(i/35+1,string.substring(i,string.length()));
            }else{
            map.put(i/35,string.substring(i,i+35));}
            if(++x >=6){
                break;
            }
        }
        return map;
    }
}
